package main.fas.org.fas_project;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.view.View;
import android.widget.TextView;

import main.fas.org.testlib.TimeUtils;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private TextView textView;
    private CardView cardView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        initParamView();
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id) {
            case R.id.btn1:
                textView.setText(TimeUtils.getCurrentFormatTime());
                break;
            default:
                break;
        }
    }

    private void initParamView() {
        textView = (TextView) findViewById(R.id.tv1);
        cardView = (CardView) findViewById(R.id.cdv1);

        findViewById(R.id.btn1).setOnClickListener(this);
    }

    private void initPageStyle() {
    }
}
